#pragma once
#include <QObject>
#include "../window/InviteExpert/inviteexpert.h"

class RoomHandler : public QObject {
    Q_OBJECT
public:
    RoomHandler(InviteExpert* inviteExpert, QObject *parent = nullptr) : inviteExpert(inviteExpert), QObject(parent) {}

    void createRoom();
    void joinRoom(const quint16& roomId);
    void leaveRoom(const quint16& roomId);

    void setInviteWindow(InviteExpert* inviteExpert) { this->inviteExpert = inviteExpert; }

public slots:
    void joinRoomAfterCreate(const quint16& roomId);

private:
    InviteExpert* inviteExpert;
};
